Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pallet-revive] Add Ethereum JSON-RPC server #6147

Open
wants to merge 195 commits into
base: master
Choose a base branch
from

Conversation

pgherveou
Copy link
Contributor

@pgherveou pgherveou commented Oct 21, 2024

Redo of #5953

@pgherveou pgherveou changed the base branch from master to pg/fix-hardcoded-gas October 24, 2024 06:48
Base automatically changed from pg/fix-hardcoded-gas to master October 24, 2024 11:03
Copy link
Member

@xermicus xermicus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Definitively gonna fire up some of the examples to try it out

substrate/bin/node/runtime/Cargo.toml Outdated Show resolved Hide resolved
substrate/frame/revive/Cargo.toml Outdated Show resolved Hide resolved
substrate/frame/revive/src/evm/runtime.rs Show resolved Hide resolved
prdoc/pr_6192.prdoc Outdated Show resolved Hide resolved
substrate/frame/revive/rpc/src/lib.rs Outdated Show resolved Hide resolved
use subxt::config::{signed_extensions, Config, PolkadotConfig};

#[subxt::subxt(
runtime_metadata_path = "kitchensink.scale",
Copy link
Member

@athei athei Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work against Westend AssetHub, right? So this seems like a non starter to be tied to a specific runtime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing this now with zombienet,
I think it will complain that metadata are not compatible,
for now the workaround would be to put each supported chain metadata behind a feature flag

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will complain that metadata are not compatible,

For a reason. The pallet ids will not match and you will be dispatching garbage.

for now the workaround would be to put each supported chain metadata behind a feature flag

Yeah this is fine for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought subxt can also fetch the metadata so we don't have to vendor it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but it will download at build time since it is used for codegen. Might be an alternative for westend which has a public URL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only sane way of using subxt is to use the dynamic API and create the calls at runtime:
https://docs.rs/subxt/latest/subxt/dynamic/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes T7-smart_contracts This PR/Issue is related to smart contracts.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants